package com.modular.iot.action;

import com.ToolOpt;
import ntd.action.ActionAbs;
import ntd.action.bo.ActionInfo;
import ntd.action.bo.ActionOutBo;

public class ActionIotModelAttribute extends ActionAbs {

    @Override
    public ActionInfo info() {
        return new ActionInfo("IOT-物模型属性设置", "iot-model-attribute-setting", new ActionIotModelAttribute());
    }

    @Override
    public ActionOutBo handle() {
        String attributeCode = actionInBo.getParamStr("attributeCode");
        String attributeVal = actionInBo.getParamStr("attributeVal");
        // 属性值更新
        ToolOpt.OPT_T_ATTRIBUTE.updateDeviceAttribute(actionInBo.getDataCode(), attributeCode, attributeVal);
        return new ActionOutBo("ok");
    }
}
